﻿Imports System.CodeDom
Imports System.Reflection

Public Class ClassObject

    Private _PropertyObjects As List(Of PropertyObject)
    Public Property PropertyObjects() As List(Of PropertyObject)
        Get
            Dim myPropertyObjects As List(Of PropertyObject) = _PropertyObjects
            If myPropertyObjects Is Nothing Then
                myPropertyObjects = New List(Of PropertyObject)
                _PropertyObjects = myPropertyObjects
            End If
            Return myPropertyObjects
        End Get
        Set(ByVal value As List(Of PropertyObject))
            _PropertyObjects = value
        End Set
    End Property

    Public Function GetPropertyObject(ByVal aPropertyName As String) As PropertyObject
        Dim myName As String = aPropertyName.ToLowerInvariant
        For Each myPropertyObject As PropertyObject In PropertyObjects
            Dim myKey As String = myPropertyObject.Name.ToLowerInvariant
            If myKey = myName Then Return myPropertyObject
        Next
        Return Nothing
    End Function

    Private _ClassNamespaceName As String
    Public Property ClassNamespaceName() As String
        Get
            Return _ClassNamespaceName
        End Get
        Set(ByVal value As String)
            _ClassNamespaceName = value
        End Set
    End Property

    Private _NamespacesToImport As List(Of String)
    Public Property NamespacesToImport() As List(Of String)
        Get
            Return _NamespacesToImport
        End Get
        Set(ByVal value As List(Of String))
            _NamespacesToImport = value
        End Set
    End Property

    Private _Name As String
    Public Property Name() As String
        Get
            Return _Name
        End Get
        Set(ByVal value As String)
            _Name = value
        End Set
    End Property

    Private _MemberAttributeObject As MemberAttributeObject
    Public Property MemberAttributeObject() As MemberAttributeObject
        Get
            Return _MemberAttributeObject
        End Get
        Set(ByVal value As MemberAttributeObject)
            _MemberAttributeObject = value
        End Set
    End Property

    Private _ClientType As TypeAttributes
    Public Property ClientType() As TypeAttributes
        Get
            Return _ClientType
        End Get
        Set(ByVal value As TypeAttributes)
            _ClientType = value
        End Set
    End Property

End Class
